package com.windyoffice.droolsdemo.controller;

import com.windyoffice.droolsdemo.service.RuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class RuleController {
  private RuleService ruleService;

  @Autowired
  public void setRuleService(RuleService ruleService) {
        this.ruleService = ruleService;
  }

    @RequestMapping("/rule")
    public String rule(){
        ruleService.rule();
        return "Ok";
    }
}
